package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.MantissaProcessingType;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.SocProgItemExample.E_AMOUNT_COMPANY;
import static org.jsola.hr.example.SocProgItemExample.E_AMOUNT_PERSONAL;
import static org.jsola.hr.example.SocProgItemExample.E_CARDINALITY_DEFAULT;
import static org.jsola.hr.example.SocProgItemExample.E_CARDINALITY_DEFAULT_AMOUNT;
import static org.jsola.hr.example.SocProgItemExample.E_CARDINALITY_MAX;
import static org.jsola.hr.example.SocProgItemExample.E_CARDINALITY_MIN;
import static org.jsola.hr.example.SocProgItemExample.E_DEFAULT_TYPE;
import static org.jsola.hr.example.SocProgItemExample.E_ITEM_MIN_CARDINALITY;
import static org.jsola.hr.example.SocProgItemExample.E_ITEM_NAME;
import static org.jsola.hr.example.SocProgItemExample.E_ITEM_REMARK;
import static org.jsola.hr.example.SocProgItemExample.E_ITEM_TYPE;
import static org.jsola.hr.example.SocProgItemExample.E_MANTISSA_PROC_COMPANY;
import static org.jsola.hr.example.SocProgItemExample.E_MANTISSA_PROC_PERSONAL;
import static org.jsola.hr.example.SocProgItemExample.E_PERSENT_COMPANY;
import static org.jsola.hr.example.SocProgItemExample.E_PERSENT_PERSONAL;
import static org.jsola.hr.example.SocProgItemExample.E_PROG_ID;
import static org.jsola.hr.example.SocProgItemExample.E_SORT;
import static org.jsola.hr.example.SocProgItemExample.M_ITEM_NAME_MAX;
import static org.jsola.hr.example.SocProgItemExample.M_ITEM_REMARK_MAX;
import static org.jsola.hr.example.SocProgItemExample.M_ITEM_TYPE_NOT_NULL;
import static org.jsola.hr.example.SocProgItemExample.M_MANTISSA_PROC_COMPANY_ENUM_NOT_MATCH;
import static org.jsola.hr.example.SocProgItemExample.M_MANTISSA_PROC_PERSONAL_ENUM_NOT_MATCH;
import static org.jsola.hr.example.SocProgItemExample.M_PROG_ID_MAX;
import static org.jsola.hr.example.SocProgItemExample.M_PROG_ID_NOT_NULL;
import static org.jsola.hr.example.SocProgItemExample.N_AMOUNT_COMPANY;
import static org.jsola.hr.example.SocProgItemExample.N_AMOUNT_PERSONAL;
import static org.jsola.hr.example.SocProgItemExample.N_CARDINALITY_DEFAULT;
import static org.jsola.hr.example.SocProgItemExample.N_CARDINALITY_DEFAULT_AMOUNT;
import static org.jsola.hr.example.SocProgItemExample.N_CARDINALITY_MAX;
import static org.jsola.hr.example.SocProgItemExample.N_CARDINALITY_MIN;
import static org.jsola.hr.example.SocProgItemExample.N_DEFAULT_TYPE;
import static org.jsola.hr.example.SocProgItemExample.N_ITEM_MIN_CARDINALITY;
import static org.jsola.hr.example.SocProgItemExample.N_ITEM_NAME;
import static org.jsola.hr.example.SocProgItemExample.N_ITEM_REMARK;
import static org.jsola.hr.example.SocProgItemExample.N_ITEM_TYPE;
import static org.jsola.hr.example.SocProgItemExample.N_MANTISSA_PROC_COMPANY;
import static org.jsola.hr.example.SocProgItemExample.N_MANTISSA_PROC_PERSONAL;
import static org.jsola.hr.example.SocProgItemExample.N_PERSENT_COMPANY;
import static org.jsola.hr.example.SocProgItemExample.N_PERSENT_PERSONAL;
import static org.jsola.hr.example.SocProgItemExample.N_PROG_ID;
import static org.jsola.hr.example.SocProgItemExample.N_SORT;

/**
 * 参保方案表子项
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【参保方案表子项】的参数")
@Data
public class SocProgItemAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_PROG_ID, example = E_PROG_ID)
    @Length(max = 32, message = M_PROG_ID_MAX)
    private String progId;

    @ApiModelProperty(notes = N_ITEM_TYPE, example = E_ITEM_TYPE, required = true)
    @NotNull(message = M_ITEM_TYPE_NOT_NULL)
    private Integer itemType;

    @ApiModelProperty(notes = N_ITEM_NAME, example = E_ITEM_NAME)
    @Length(max = 255, message = M_ITEM_NAME_MAX)
    private String itemName;

    @ApiModelProperty(notes = N_CARDINALITY_DEFAULT, example = E_CARDINALITY_DEFAULT)
    private BigDecimal cardinalityDefault;

    @ApiModelProperty(notes = N_ITEM_MIN_CARDINALITY, example = E_ITEM_MIN_CARDINALITY)
    private BigDecimal itemMinCardinality;

    @ApiModelProperty(notes = N_CARDINALITY_DEFAULT_AMOUNT, example = E_CARDINALITY_DEFAULT_AMOUNT)
    private BigDecimal cardinalityDefaultAmount;

    @ApiModelProperty(notes = N_CARDINALITY_MIN, example = E_CARDINALITY_MIN)
    private BigDecimal cardinalityMin;

    @ApiModelProperty(notes = N_CARDINALITY_MAX, example = E_CARDINALITY_MAX)
    private BigDecimal cardinalityMax;

    @ApiModelProperty(notes = N_PERSENT_COMPANY, example = E_PERSENT_COMPANY)
    private BigDecimal persentCompany;

    @ApiModelProperty(notes = N_PERSENT_PERSONAL, example = E_PERSENT_PERSONAL)
    private BigDecimal persentPersonal;

    @ApiModelProperty(notes = N_AMOUNT_COMPANY, example = E_AMOUNT_COMPANY)
    private BigDecimal amountCompany;

    @ApiModelProperty(notes = N_AMOUNT_PERSONAL, example = E_AMOUNT_PERSONAL)
    private BigDecimal amountPersonal;

    @ApiModelProperty(notes = N_MANTISSA_PROC_COMPANY, example = E_MANTISSA_PROC_COMPANY, allowableValues = MantissaProcessingType.VALUES_STR)
    @Const(constClass = MantissaProcessingType.class, message = M_MANTISSA_PROC_COMPANY_ENUM_NOT_MATCH)
    private Integer mantissaProcCompany;

    @ApiModelProperty(notes = N_MANTISSA_PROC_PERSONAL, example = E_MANTISSA_PROC_PERSONAL, allowableValues = MantissaProcessingType.VALUES_STR)
    @Const(constClass = MantissaProcessingType.class, message = M_MANTISSA_PROC_PERSONAL_ENUM_NOT_MATCH)
    private Integer mantissaProcPersonal;

    @ApiModelProperty(notes = N_SORT, example = E_SORT)
    private Integer sort;

    @ApiModelProperty(notes = N_DEFAULT_TYPE, example = E_DEFAULT_TYPE)
    private Integer defaultType;

    @ApiModelProperty(notes = N_ITEM_REMARK, example = E_ITEM_REMARK)
    @Length(max = 255, message = M_ITEM_REMARK_MAX)
    private String itemRemark;


}

